import React  from "react";

interface IVisuallyHiddenProps {
  as: React.ElementType;
}

const VisuallyHidden = ({ as: Component, ...props }: IVisuallyHiddenProps) => (
    <Component {...props} className='sr-only' />
  )
  
  VisuallyHidden.defaultProps = {
    as: 'span'
  }

export default VisuallyHidden;